package com.midea.ai.air.ui.home.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.midea.ai.air.R;
import com.midea.ai.air.common.BaseFragment;
import com.midea.ai.air.common.ConsVal;
import com.midea.ai.air.ui.home.ActivityNotSlip;
import com.midea.ai.air.utils.JumpUtils;
import com.midea.ai.air.view.CircleButton;

/**
 * Created by ouyangdi on 2015/12/14.
 */
public class TopTabFragment extends BaseFragment implements View.OnClickListener{
    private CircleButton mIvWeather;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_top_tab_home, container, false);
        initView(view);
        return view;
    }

    private void initView(View view) {
        mIvWeather = (CircleButton)view.findViewById(R.id.iv_weather);
        mIvWeather.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.iv_weather:
                JumpUtils.toPage(getActivity(), "", "主页", ConsVal.ACTIVITY_TAG_WEATHER, ActivityNotSlip.class);
                break;
        }
    }
}
